Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework Fake.Core.Target package #1664

Merged
merged 11 commits into from
Sep 25, 2017

Conversation

devcrafting
Copy link
Contributor

**/!\ There is a breaking change with NuGet package rename to be consistent between Nuget package and namespace

  • Documentation improved (I reordered paragraphs to put important notes first)
  • Add more Obsolete messages in TargetHelper and AdditionalSyntax (including 2 new codes for "not yet migrated" and "no more accessible")
  • Remove remaning "Target" suffix
  • Rename Print in ListAvailable

@devcrafting devcrafting changed the title [WIP] Reword Fake.Core.Target package [WIP] Rework Fake.Core.Target package Sep 18, 2017
@matthid
Copy link
Member

matthid commented Sep 18, 2017

Apparently this needs a merge/rebase after the latest PR merges, sorry.

Copy link
Member

@matthid matthid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice - thanks for helping out with this.


## Migration Guide

Upgrading to FAKE 5 is a multi step process and has various manual steps in between. Here are the steps:
Upgrading to FAKE 5 is a multi step process and has various manual steps in between. **If you do these steps out of order it will be a lot harder for you to migrate the script successfully**. Here are the steps:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.

getTargetDict().Values
|> Seq.iter (fun target ->
Trace.tracefn " - %s %s" target.Name (match target.Description with Some d -> " - " + d | _ -> "")
Trace.tracefn " Depends on: %A" target.Dependencies)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch.

@devcrafting devcrafting force-pushed the feature/migration-improvements branch from 954d16d to b474d43 Compare September 18, 2017 18:21
@devcrafting
Copy link
Contributor Author

Rebase done (someone already fixed doc around Target)

@devcrafting devcrafting changed the title [WIP] Rework Fake.Core.Target package Rework Fake.Core.Target package Sep 18, 2017
@devcrafting
Copy link
Contributor Author

Any chance to have a look at this PR @matthid ? Thanks

@matthid
Copy link
Member

matthid commented Sep 22, 2017

Yes I'm kind of slow at the moment. next step is to release all the stuff I've merged and update to netcoreapp20 and fixing the release pipeline (some things are not yet automated - see fake.api.github pr). Than I can test the release pipeline for example with this pr

Copy link
Member

@matthid matthid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -57,4 +57,4 @@ Target "Default" DoNothing
==> "Default"

// start build
RunParameterTargetOrDefault "target" "Default"
RunTargetOrDefault "Default"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Target.RunParameterOrDefault or Target.RunOrDefault?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I like your suggestion...I will do it and normalize casing in a new PR, do you agree?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually I was wrong on this. I have no idea where this file is used and if updating this breaks anything...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking you were saying that RunParameterOrDefault would be a better name than just RunOrDefault?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No your change is fine. I'm not sure why we even have runparameterordefault

- FAKE0001 for moving part from one Module to another
- FAKE0002 for removed API we don't know who is using it and how => please open an issue if you use it
- FAKE0003 for API that is no more accessible (basically became internal) => please open an issue if you use it
- FAKE0004 for API not yet migrated, waiting for your contribution
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice idea.

@@ -53,27 +53,27 @@ Now we have the following options:
## Final targets

Final targets can be used for TearDown functionality.
These targets will be executed even if the build fails but have to be activated via ActivateFinalTarget().
These targets will be executed even if the build fails but have to be activated via ActivateFinal().
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we write Target.ActivateFinal here to advertise the new usage?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.


BuildFailureTarget "ReportErrorViaMail" (fun _ ->
CreateBuildFailure "ReportErrorViaMail" (fun _ ->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Target.?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

// Activate BuildFailureTarget somewhere during build
ActivateBuildFailureTarget "ReportErrorViaMail"
// Activate Build Failure Target somewhere during build
ActivateBuildFailure "ReportErrorViaMail"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Target.?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.



"Clean"
==> "Build"
==> "Deploy"

RunTargetOrDefault "Deploy"
Target.RunOrDefault "Deploy"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

- Fix all the (obsolete) warnings in your build-script to use the new API (see the 'Use the new FAKE-API' section).
- Update to legacy FAKE 5. This should not be breaking. If it breaks you please open an issue.

- With Paket: add `prerelease` after `nuget FAKE` in paket.dependencies file then `.paket/paket.exe update FAKE`, check that paket.lock references FAKE version 5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may need to remember to remove prerelease after releasing FAKE.

@matthid
Copy link
Member

matthid commented Sep 24, 2017

Ok I've merged this into #1678 if you want to push additional changes please use a new branch/PR if possible. Thanks.

GitHub should merge/close this PR as soon as #1678 is merged.

@matthid matthid merged commit a48b02e into fsprojects:master Sep 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants